You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is our final PR for the JUnit 5 upgrade. In this PR, we are completely removing all related JUnit 4 dependencies. As a result, org.hamcrest, which was previously brought in via JUnit 4, will no longer be available. This leads to a few minor code changes across three modules. Given the small scope of these changes, I’ve decided to include them in this PR instead of creating multiple separate ones.
The details are as follows:
Hadoop Auth
The original code made use of org.hamcrest. I have replaced it with AssertJ assertions to align with JUnit 5 standards.
HDFS - DiskBalancerResultVerifier.java
This class is currently unused in the project, so I’ve removed it.
HDFS -TestHAFsck.java
The original use of JUnit 4’s @RunWith(Parameterized.class) has been migrated to JUnit 5’s @ParameterizedClass to support parameterized testing.
Hadoop Azure - Parallelized.java
Similarly, since this class is not being referenced anywhere, I’ve removed it as well.
How was this patch tested?
CI Test.
For code changes:
Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?
The build result of this PR is as expected, and we are now able to remove the dependency on JUnit 4. There is only one remaining test case with an issue, which we plan to address in a follow-up PR.
Many thanks for everyone's support! With this change, the Hadoop trunk branch has completely removed the dependency on JUnit 4 and has fully migrated to JUnit 5.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
HADOOP-19617 - [JDK17] Remove JUnit4 Dependency.
This is our final PR for the
JUnit 5upgrade. In this PR, we are completely removing all relatedJUnit4 dependencies. As a result,org.hamcrest, which was previously brought in viaJUnit 4, will no longer be available. This leads to a few minor code changes across three modules. Given the small scope of these changes, I’ve decided to include them in this PR instead of creating multiple separate ones.The details are as follows:
The original code made use of
org.hamcrest. I have replaced it with AssertJ assertions to align withJUnit 5standards.This class is currently unused in the project, so I’ve removed it.
The original use of JUnit 4’s
@RunWith(Parameterized.class)has been migrated to JUnit 5’s@ParameterizedClassto support parameterized testing.Similarly, since this class is not being referenced anywhere, I’ve removed it as well.
How was this patch tested?
CI Test.
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?